gtk/deprecated/gtkstatusicon.c: Fix Build on C89 Compilers
authorChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 24 Oct 2014 04:23:31 +0000 (12:23 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 24 Oct 2014 04:23:31 +0000 (12:23 +0800)
Declare variable at the top of the block, which is needed from the change
in commit 1bad7865.

gtk/deprecated/gtkstatusicon.c

index 1fdb9d1772ca514731053abade02f91a916e8b75..2850679d2fa4d7e97b9a0548870e51619fdda225 100644 (file)
@@ -2600,6 +2600,9 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
 #ifdef GDK_WINDOWING_X11
   GtkStatusIconPrivate *priv;
 #endif
+#if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_QUARTZ)
+  gchar *text = NULL;
+#endif
 
   g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
 
@@ -2610,14 +2613,12 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
     gtk_widget_set_tooltip_markup (priv->tray_icon, markup);
 #endif
 #ifdef GDK_WINDOWING_WIN32
-  gchar *text = NULL;
   if (markup)
     pango_parse_markup (markup, -1, 0, NULL, &text, NULL, NULL);
   gtk_status_icon_set_tooltip_text (status_icon, text);
   g_free (text);
 #endif
 #ifdef GDK_WINDOWING_QUARTZ
-  gchar *text = NULL;
   if (markup)
     pango_parse_markup (markup, -1, 0, NULL, &text, NULL, NULL);
   gtk_status_icon_set_tooltip_text (status_icon, text);